﻿using System;
using System.Net;
using System.ServiceModel.Channels;

namespace SilverlightRestServices.Channels
{
    internal class RestMessageEncoderFactory : MessageEncoderFactory
    {
        private MessageVersion m_MessageVersion;
        private RestMessageEncoder m_Encoder;

        public override MessageVersion MessageVersion
        {
            get { return this.m_MessageVersion; }
        }

        public override MessageEncoder Encoder
        {
            get { return this.m_Encoder; }
        }

        public RestMessageEncoderFactory(MessageVersion messageVersion)
        {
            this.m_MessageVersion = messageVersion;
            this.m_Encoder = new RestMessageEncoder(messageVersion);
        }
    }
}
